package com.ly.houses.service.impl;

import com.ly.houses.mapper.BuildingMapper;
import com.ly.houses.model.Building;
import com.ly.houses.service.BuildingService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BuildingServiceImpl implements BuildingService {
    @Resource
    private BuildingMapper buildingMapper;
    @Override
    public void batchSave(List<Building> buildings) {
        buildingMapper.batchSave(buildings);
    }

    @Override
    public void batchUpdate(List<Building> buildings) {
        buildingMapper.batchUpdate(buildings);
    }

    @Override
    public List<Building> selectAllBuilding() {
        return buildingMapper.selectAllBuilding();
    }

    @Override
    public List<Building> listBuildingByPlateId(Long plateId) {
        return buildingMapper.listBuildingByPlateId(plateId);
    }
    @Override
    public Building getById(Long buildingId) {
        return buildingMapper.getById(buildingId);
    }
}
